﻿using DevExpress.XtraEditors;
using System.Drawing;
using System.Windows.Forms;

namespace Rimifier
{
  public partial class BaseForm : XtraForm
  {
    public BaseForm()
    {
      InitializeComponent();
      SetupFormTitle();
    }

    private void SetupFormTitle()
    {
      if (Tag != null)
      {
        Text = Tag.ToString();
      }
    }

    protected internal void CenterScreenMySelf()
    {
      var boundWidth = Screen.PrimaryScreen.Bounds.Width;
      var boundHeight = Screen.PrimaryScreen.Bounds.Height;
      var x = boundWidth - Width;
      var y = boundHeight - Height;
      Location = new Point(x / 2, y / 2);
    }
  }
}
